﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.Linq;
using System.Text;
using BusinessInterfaces;

namespace BusinessCommon
{
    [Export(typeof(IDiagnostics))]
    public class Diagnostics : IDiagnostics
    {
        public List<string> LogMessages { get; set; }
 
        public Diagnostics(){LogMessages = new List<string>();}
        public void Log(string message)
        {
            Debug.Write(message);
            LogMessages.Add(message);
        }

        public void LogException(Exception ex)
        {
            Debug.Write(ex.ToString());
            LogMessages.Add(ex.Message);
        }
    }

}
